home *** CD-ROM | disk | FTP | other *** search
/ Gekikoh Dennoh Club 5 / Gekikoh Dennoh Club Vol. 5 (Japan).7z / Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin / tools / condrv / cond_e12.lzh / src / include / dos.mac < prev    next >
Text File  |  1997-09-25  |  3KB  |  214 lines

  1.         .nlist
  2.  
  3. *        dos.mac
  4. *            RUKA assembler macro for X680x0/Human68k(v3)
  5. *            version 1.00 1997/09/26 Tachibana Eririn.
  6.  
  7.         .ifndef    __dos_mac__
  8.             __dos_mac__:=1
  9.  
  10.  
  11. * Include ------------------------------------- *
  12.  
  13.         .ifndef    __doscall_mac__
  14.         .include  doscall.mac
  15.         .endif
  16.  
  17.  
  18. * Structure ----------------------------------- *
  19.  
  20.         .offset    0
  21. INPPTR_MAX:    .ds.b    1
  22. INPPTR_LENGTH:    .ds.b    1
  23. INPPTR_BUFFER:    .ds.b    256
  24. sizeof_INPPTR:
  25.         .fail    $.ne.258
  26.  
  27.         .offset    0
  28. INDOS_INDOSF:    .ds    1
  29. INDOS_DOSCMD:    .ds.b    1
  30. INDOS_FAT_FLG:    .ds.b    1
  31. INDOS_RETRY_COUNT:.ds    1
  32. INDOS_RETRY_TIME:.ds    1
  33. INDOS_VERIFYF:    .ds    1
  34. INDOS_BREAKF:    .ds.b    1
  35. INDOS_CTRLPF:    .ds.b    1
  36.         .ds.b    1
  37. INDOS_WKCURDRV:    .ds.b    1
  38. sizeof_INDOS:
  39.         .fail    $.ne.14
  40.  
  41.         .offset    0
  42. COMLINE_LEN:    .ds.b    1
  43. COMLINE_BUFFER:    .ds.b    255
  44. sizeof_COMLINE:
  45.         .fail    $.ne.256
  46.  
  47.         .offset    0
  48. FREEINF_FREE:    .ds    1
  49. FREEINF_MAX:    .ds    1
  50. FREEINF_SEC:    .ds    1
  51. FREEINF_BYTE:    .ds    1
  52. sizeof_FREEINF:
  53.         .fail    $.ne.8
  54.  
  55.         .offset    0
  56. PRCCTRL_LENGTH:    .ds.l    1
  57. PRCCTRL_BUF_PTR:.ds.l    1
  58. PRCCTRL_COMMAND:.ds    1
  59. PRCCTRL_YOUR_ID:.ds    1
  60. sizeof_PRCCTRL:
  61.         .fail    $.ne.12
  62.  
  63.         .text
  64.  
  65.  
  66. * Error No ------------------------------------ *
  67.  
  68. DOSE_ILGFNC:    .equ    -1
  69. DOSE_NOENT:    .equ    -2
  70. DOSE_NODIR:    .equ    -3
  71. DOSE_MFILE:    .equ    -4
  72. DOSE_ISDIR:    .equ    -5
  73. DOSE_BADF:    .equ    -6
  74. DOSE_BROKNMEM:    .equ    -7
  75. DOSE_NOMEM:    .equ    -8
  76. DOSE_ILGMPTR:    .equ    -9
  77. DOSE_ILGENV:    .equ    -10
  78. DOSE_ILGFMT:    .equ    -11
  79. DOSE_ILGARG:    .equ    -12
  80. DOSE_ILGFNAME:    .equ    -13
  81. DOSE_ILGPARM:    .equ    -14
  82. DOSE_ILGDRV:    .equ    -15
  83. DOSE_ISCURDIR:    .equ    -16
  84. DOSE_CANTIOC:    .equ    -17
  85. DOSE_NOMORE:    .equ    -18
  86. DOSE_RDONLY:    .equ    -19
  87. DOSE_EXISTDIR:    .equ    -20
  88. DOSE_NOTEMPTY:    .equ    -21
  89. DOSE_CANTREN:    .equ    -22
  90. DOSE_DISKFULL:    .equ    -23
  91. DOSE_DIRFULL:    .equ    -24
  92. DOSE_CANTSEEK:    .equ    -25
  93. DOSE_SUPER:    .equ    -26
  94. DOSE_DUPTHNAM:    .equ    -27
  95. DOSE_CANTSEND:    .equ    -28
  96. DOSE_THFULL:    .equ    -29
  97. DOSE_LCKFULL:    .equ    -32
  98. DOSE_LCKERR:    .equ    -33
  99. DOSE_BUSYDRV:    .equ    -34
  100. DOSE_SYMLOOP:    .equ    -35
  101. DOSE_EXISTFILE:    .equ    -80
  102.  
  103.  
  104. * Constant ------------------------------------ *
  105.  
  106. EXIT_SUCCESS:    .equ    0
  107. EXIT_FAILURE:    .equ    1
  108.  
  109. STDIN:        .equ    0
  110. STDOUT:        .equ    1
  111. STDERR:        .equ    2
  112. STDAUX:        .equ    3
  113. STDPRN:        .equ    4
  114.  
  115. ATR_EXEC:    .equ    7
  116. ATR_LINK:    .equ    6
  117. ATR_ARC:    .equ    5
  118. ATR_DIR:    .equ    4
  119. ATR_VOL:    .equ    3
  120. ATR_SYS:    .equ    2
  121. ATR_HID:    .equ    1
  122. ATR_READ:    .equ    0
  123.  
  124. EXEC:        .equ    7
  125. SYMLINK:    .equ    6
  126. ARCHIVE:    .equ    5
  127. DIRECTORY:    .equ    4
  128. VOLUME:        .equ    3
  129. SYSTEM:        .equ    2
  130. HIDDEN:        .equ    1
  131. READONLY:    .equ    0
  132.  
  133. READRV:        .equ    $40
  134. VIRDRV:        .equ    $50
  135. VIRDIR:        .equ    $60
  136.  
  137. ROPEN:        .equ    0
  138. WOPEN:        .equ    1
  139. RWOPEN:        .equ    2
  140. *COPEN:        .equ    3
  141. *DOPEN:        .equ    4
  142.  
  143. SEEK_SET:    .equ    0
  144. SEEK_CUR:    .equ    1
  145. SEEK_END:    .equ    2
  146.  
  147. EXEC_LOADEXEC:    .equ    0
  148. EXEC_LOAD:    .equ    1
  149. EXEC_PATHCHK:    .equ    2
  150. EXEC_DEVLOAD:    .equ    3
  151. EXEC_EXEC:    .equ    4
  152. EXEC_BINDNO:    .equ    5
  153.  
  154. THREAD_KILL:    .equ    $fff9
  155. THREAD_WAKEUP:    .equ    $fffb
  156. THREAD_SLEEP:    .equ    $fffc
  157. THREAD_ISBUSY:    .equ    $ffff
  158.  
  159. INPUT_MAX:    .equ    256
  160. ENV_MAX:    .equ    256
  161. DRIVE_MAX:    .equ    26
  162.  
  163. MB_2DD10:    .equ    $e0
  164. MB_1D9:        .equ    $e5
  165. MB_2D9:        .equ    $e6
  166. MB_1D8:        .equ    $e7
  167. MB_2D8:        .equ    $e8
  168. MB_2HT:        .equ    $ea
  169. MB_2HS:        .equ    $eb
  170. MB_2HDE:    .equ    $ec
  171. MB_1DD9:    .equ    $ee
  172. MB_1DD8:    .equ    $ef
  173.  
  174. MB_DAT:        .equ    $f4
  175. MB_CDROM:    .equ    $f5
  176. MB_MO:        .equ    $f6
  177. MB_HD:        .equ    $f7
  178. MB_SASI:    .equ    $f8
  179. MB_RAMDISK:    .equ    $f9
  180. MB_2HQ:        .equ    $fa
  181. MB_2DD8:    .equ    $fb
  182. MB_2DD9:    .equ    $fc
  183. MB_2HC:        .equ    $fd
  184. MB_2HD:        .equ    $fe
  185.  
  186.  
  187. * User Macro ---------------------------------- *
  188.  
  189. TO_SUPER:    .macro
  190.         clr.l    -(sp)
  191.         DOS    _SUPER
  192.         move.l    d0,(sp)
  193.         .endm
  194.  
  195. TO_USER:    .macro
  196.         DOS    _SUPER
  197.         addq.l    #4,sp
  198.         .endm
  199.  
  200. TO_USER2:    .macro
  201.         .local    skip
  202.         tst.b    (sp)
  203.         bmi    skip
  204.         DOS    _SUPER
  205. skip:        addq.l    #4,sp
  206.         .endm
  207.  
  208.  
  209. * End of File --------------------------------- *
  210.  
  211.         .endif
  212.  
  213.         .list
  214.